package com.rajeshDyadav.map;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

public class MapTest01
{
    public static void main(String[] args)
    {
	Map<String, String> map = System.getenv();
	Set<String> set = map.keySet();	
	Iterator<String> iterator = set.iterator();
	String key;
	while(iterator.hasNext())
	{
	    key = iterator.next();
	    System.out.println(key + " ..> " + map.get(key));
	}	
	
	
	
	HashMap<String, ArrayList<String>> hashMap = new HashMap<String, ArrayList<String>>();
	
	ArrayList<String> detailList = new ArrayList<String>();
	detailList.clear();
	detailList.add(0,"11");
	detailList.add(1,"22");
	hashMap.put("AA", detailList);

	detailList.clear();
	detailList.add(0,"55");
	detailList.add(1,"66");
	hashMap.put("BB", detailList);

	set = hashMap.keySet();	
	iterator = set.iterator();

	while(iterator.hasNext())
	{
	    key = iterator.next();
	    System.out.println(key + " ..> " + hashMap.get(key));
	}
	
	
    }
}
